Deriving Mixed Evaluation from Standard Evaluation for a Simple Functional Language
نویسندگان
چکیده
We demonstrate how a specification for the standard evaluation of a simple functional programming language can be systematically extended to a specification for mixed evaluation. Using techniques inspired by natural semantics we specify a standard evaluator by a set of inference rules. The evaluation of programs is then performed by a restricted kind of theorem proving in this logic. We then describe a systematic method for extending the proof system for standard evaluation to a new proof system that provides greater flexibility in treating bound variables in the object-level functional programs. We demonstrate how this extended proof system provides the capabilities of a mixed evaluator and how correctness with respect to standard evaluation can be proved in a simple and direct manner. The current work focuses only on a primitive notion of mixed evaluation for a simple functional programming language, but we believe that our methods will extend to more sophisticated kinds of evaluations and richer languages. Comments University of Pennsylvania Department of Computer and Information Science Technical Report No. MSCIS-89-28. This technical report is available at ScholarlyCommons: http://repository.upenn.edu/cis_reports/787 Deriving Mixed Evaluation From Standard Evaluation For A Simple Functional Language MS-CIS-89-28 LINC LAB 150 John Hannan Dale Miller Department of Computer and Information Science School of Engineering and Applied Science University of Pennsylvania Philadelphia, PA 19104-6389 May 1989 This is a revised version os a paper appearing at the International Conference on the Mathematics of Program Construction, Twente University, The Netherlands, June 1989. Acknowledgements: The first author is supported in part by a fellowship from the Corporate Research and Architecture Group, Digital Equipment Corporation, Maynard, MA USA. Both authors are supported in part by NSF grants CCR-05596-MCS-8219196-CER, IRI84-10413-A02, ONR N00014-88-K-0633, DARPA grant N00014-85-K-0018 and U.S. Army grants DAA29-84-K-0061, DAA29-84-9-0027 Deriving Mixed Evaluation from Standard Evaluation for a Simple Functional Language1 JOHN HANNAN and DALE MILLER Department of Computer and Information Science University of Pennsylvania Philadelphia, PA 191 04-6389 USA We demonstrate how a specification for the standard evaluation of a simple functional programming language can be systematically extended to a specification for mixed evaluation. Using techniques inspired by natural semantics we specify a standard evaluator by a set of inference rules. The evalu a, t' lon of programs is then performed by a restricted liind of theorem proving in this logic. We then describe a systematic method for extending the proof system for standard evaluation to a new proof system that provides greater flexibility in treating bound variables in the object-level functional programs. We demonstrate how this extended proof system provides the capabilities of a mixed evaluator and how correctness with respect to standard evaluation can be proved in a simple and direct manner. The current work focuses only on a primitive notion of mixed evaluation for a simple functional programming language, but we believe that our methods will extend to more sophisticated liinds of evaluations and richer languages.
منابع مشابه
Deriving a Lazy Abstract Machine
We derive a simple abstract machine for lazy evaluation of the lambda calculus, starting from Launchbury's natural semantics. Lazy evaluation here means non-strict evaluation with sharing of argument evaluation, that is, call-by-need. The machine we derive is a lazy version of Krivine's abstract machine, which was originally designed for call-by-name evaluation. We extend it with datatype const...
متن کاملProspect 1 and Four Corners 1 in the Spotlight: Textbook Evaluation with Some Reference to Critical Discourse Analysis
As an analytical type of approach, Critical Discourse Analysis (CDA) deals with the emphasis on social practice, identity, power, and ideology built through text and speech in socio-political and educational contexts. Having proposed a theoretical framework, it uncovered all discrepant ways through which power and societal practices are produced in written and spoken texts. Moreover, mingled wi...
متن کاملEvaluation of Rough Set Theory for Decision Making of rehabilitation Method for Concrete Pavement
In recent years a great number of advanced theoretical - empirical methods has been developed for design & modeling concrete pavements distress. But there is no reliable theoretical method to be use in evaluation of conerete pavements distresses and making a decision about repairing them. Only empirical methods is used for this reason. One of the most usual methods in evaluating concrete paveme...
متن کاملنتایج درمان جراحی بیماران سین داکتیلی، بیمارستان امام، 81-1372
Conclusion: Despite the long history of surgical treatment in syndactyly repair, this reconstructive operation has still special complexities. Materials and Methods: In order to evaluation of results of our surgical reconstructions, we studied 77 patients (40 boys and 37 girls) with hand syndactyly (mean age at operation: 5.8±4.3 years) in Imam Khomeini Hospital from 1994 to 2003. All of these ...
متن کاملRealistic Program Specialization in a Multi-Paradigm Language
This paper introduces a novel approach for the specialization of functional logic languages. We consider a maximally simpliied abstract representation of programs (which still contains all the necessary information) and deene a non-standard semantics for these programs. Both things mixed together allow us to design a simple and concise partial evaluation method for modern functional logic langu...
متن کامل